package com.xxx.mall.dto;

import lombok.Data;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;

/**
 * @author 邢晨旭
 * {@code @date} 2023/11/19
 */
@Data
public class PageQuery {

    @NotNull(message = "页码不能为空")
    @Min(value = 1, message = "页码不能小于1")
    private Integer page;

    @NotNull(message = "每页大小不能为空")
    @Range(min = 1, max = 500, message = "每页大小必须在1-500之间")
    private Integer size;
}
